﻿using DocumentFormat.OpenXml.Lite.DrawingML.Base;
using DocumentFormat.OpenXml.Lite.DrawingML.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Text
{
    [XmlRoot("buBlip", Namespace = Constants.Main)]
    public class PictureBullet : XmlSerializable, ITextBullet
    {
        [XmlElement("blip", Namespace = Constants.Main)]
        public Blip Blip { get; set; }

        public PictureBullet() { }
    }

    [XmlRoot("blip", Namespace = Constants.Main)]
    public class Blip : XmlSerializable
    {
        [Optional]
        [XmlAttribute("embed", Namespace = Constants.Relationship, Form = XmlSchemaForm.Qualified)]
        public string EmbeddedPictureReference { get; set; }

        [Optional]
        [XmlAttribute("link", Form = XmlSchemaForm.Qualified)]
        public string LinkedPictureReference { get; set; }

        [Optional]
        [XmlAttribute("cstate", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_BlipCompression> CompressionState { get; set; }

        [Optional]
        [XmlElement("", Namespace = Constants.Main)]
        public XmlList<IBlipElement> Elements { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.Main)]
        public ExtensionList ExtensionList { get; set; }

        public Blip()
        {
            Elements = new XmlList<IBlipElement>();
        }
    }
}
